<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>前台首页</title>
<!-- 导入主题样式 -->
<link rel="stylesheet"
	href="../../public/easyui/themes/bootstrap/easyui.css" />
<!-- 导入图标库 -->
<link rel="stylesheet" href="../../public/easyui/themes/icon.css" />
<!-- js文件，顺序：jq，easyui，国际化包 -->
<link rel="stylesheet" href="../../public/css/front.css" />
<link rel="stylesheet" href="../../public/css/front_head.css" />
<link rel="stylesheet" href="../../public/css/publish.css" />
<script type="text/javascript" src="../../public/js/jquery.min.js"></script>
<script type="text/javascript" src="../../public/js/front_work.js"></script>
<script type="text/javascript" src="../../public/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../../public/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="../../public/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../../public/js/highcharts.js"></script>
<script type="text/javascript" src="../../public/js/score.js"></script>
<script type="text/javascript">
		$(function(){
			var data6={
			    title:'每月/日客服数',
			    xAxis:${stuname},
			    yAxis:[{name:'成绩',data:${scores} }],
			}
		    createCharts("a6",data6);
		});
</script>
</head>
<body
	style="background-image: url(../../public/images/bg_text.png); background-repeat: no-repeat;">
	<jsp:include page="../header.jsp"></jsp:include>
	<div class="welcome">
		亲爱的『${user.name}』${user.student.gender == '男' ? '帅哥' : '美女'}，今天是2018年11月16日，株洲天气：<span id="weather">小雨，当前气温：2度</span>。欢迎您使用新职课JAVA学习平台，祝您学习进步，成为IT界的精英^_^……
	</div>
	<div class="easyui" fit="true">
		<div data-options="region:'center'" style="border: 0">
			<h1>
			<a href="javascript: history.go(-1);"><img src="../../public/images/left_arrow.png"></a>
			${ct.name}
			</h1>
			<fieldset class="fs">
				<legend>基本信息</legend>
			<div class="right3">
   		    	<div id="a6" class="container" style="height: 290px"></div>
   			</div>
				<div class="left3">
					<div class="exam_info"><span style="font-size: 40px;">${jds.allScore}</span></div>
					<div class="exam_info">【试卷名称】：TR09-${ct.name}</div>
					<div class="exam_info">【出卷人】： ${ct.emp.name}</div>
					<div class="exam_info">【选择题数】： ${ct.chooseCount}道题</div>
					<div class="exam_info">【判断题数】： ${ct.opinionCount}道题</div>
					<div class="exam_info">【编程题数】： ${ct.programCount}道题</div>
					<div class="exam_info">【考试内容】： 《${zj.dagang.name}》</div>
					<div class="exam_info">
						【涉及章节】：
						<c:forEach items="${ct.cla}" var="c">
	   				【${zj.name}】
	   			</c:forEach>

					</div>
					<div class="exam_info">【说明】：${empty ct.remark ? '无' : ct.remark}</div>
				</div>


			</fieldset>
			<form id="workFrom">
				<input type="hidden" id="workid" name="workid" value="${ct.id}">
				<div>
					<input type="hidden" id="zjid" value="${zj.id}" />
					<c:if test="${not empty choise.choises}">
					<fieldset
						style="border: none; width: 96%; margin-top: 10px; margin-left: 20px;">
						<legend style="font-weight: bold; padding-bottom: 10px;">选择题(共${choise.choises.size()}题)</legend>
						<ol type="1" class="borderw" style="padding-left: 40px;">
							<c:forEach items="${choise.choises}" var="c" varStatus="status">
								<li class="li_question">
									<div class="question_title">
										<font color="red">(得分${choise.choisesanswer[status.index].score})</font>${c.title}(选${c.answer.length()}项) <span
											class="correct_answer"> <c:choose>
												<c:when
													test="${choise.choisesanswer[status.index].answer != c.answer}">
													<font color="red">${choise.choisesanswer[status.index].answer}</font>
												</c:when>
												<c:otherwise>	
										 				${choise.choisesanswer[status.index].answer}
										 		</c:otherwise>
											</c:choose>
										</span>
										<c:if
											test="${choise.choisesanswer[status.index].answer != c.answer}">
					 						 (正确答案：${c.answer})
								  			</c:if>
									</div>
									<ol type="A" style="padding-left: 0px;">
										<c:choose>
											<c:when test="${c.answer.length() == 1}">
												<input type="hidden" name="answercid" value="${c.id }" />
												<li>${c.optionA}</li>
												<li>${c.optionB}</li>
												<li>${c.optionC}</li>
												<li>${c.optionD}</li>
											</c:when>
											<c:otherwise>
												<input type="hidden" name="answercid" value="${c.id }" />
												<li>${c.optionA}</li>
												<li>${c.optionB}</li>
												<li>${c.optionC}</li>
												<li>${c.optionD}</li>
											</c:otherwise>
										</c:choose>

									</ol>
								</li>
							</c:forEach>
						</ol>
					</fieldset>
					</c:if>
					<c:if test="${not empty opinion.opinions}">
					<fieldset
						style="border: none; width: 96%; margin-top: 10px; margin-left: 20px;">
						<legend style="font-weight: bold; padding-bottom: 10px;"">判断题(共${opinion.opinions.size()}题)</legend>
						<ol type="1" class="borderw" style="padding-left: 40px;">
							<c:forEach items="${opinion.opinions}" var="o" varStatus="status">
								<li class="li_question">
									<div class="question_title">
										<input type="hidden" name="answeroid" value="${o.id }" /> <label>
											<font color="red">(得分${opinion.opinionsanswer[status.index].score})</font>${o.title} <c:choose>
												<c:when
													test="${opinion.opinionsanswer[status.index].answer != o.answer}">
													<span class="correct_answer"> <font color="red">${opinion.opinionsanswer[status.index].answer}</font>
													</span>
												</c:when>
												<c:otherwise>
													<span class="correct_answer">${opinion.opinionsanswer[status.index].answer}</span>
												</c:otherwise>
											</c:choose> <c:if
												test="${opinion.opinionsanswer[status.index].answer != o.answer}">
					 						 (正确答案：${o.answer})
								  			</c:if>
									</div>
								</li>
							</c:forEach>
						</ol>
					</fieldset>
					</c:if>
					<c:if test="${not empty program.programs}">
					<fieldset
						style="border: none; width: 96%; margin-top: 10px; margin-left: 20px;">
						<legend style="font-weight: bold; padding-bottom: 10px;"">编程题(共${program.programs.size()}题)</legend>
						<ol type="1" class="borderw" style="padding-left: 40px;">
							<c:forEach items="${program.programs}" var="p" varStatus="status">
								<li class="li_question"><input type="hidden"
									name="answerpid" value="${p.id }" />
									<div class="question_title">
										 <pre><font color="red">(得分${program.programsanswer[status.index].score})</font>${p.title}</pre>
									</div>
									<div>
										<pre>${program.programsanswer[status.index].answer}	</pre>
									</div>
										<c:if test="${not empty program.programsanswer[status.index].comment}">
											<fieldset style="border:1px solid gray; border-radius: 4px;margin-top: 30px;background-color: #FFFACD;color: #2AABE2;width: 50%;">
											<legend style="padding:0;font-size: 13px;color:red;">教师评语</legend>
												${program.programsanswer[status.index].comment}									
											</fieldset>
										</c:if>
									</li>
							</c:forEach>
						</ol>
					</fieldset>
					</c:if>
				</div>
			</form>
		</div>
	</div>
</body>
</html>